function getSumArr(arr) {
    return arr.reduce((sum, item) => sum += item, 0)
}
console.log(getSumArr([1, 2, 3]));